package threadDemo1.extend_Thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-02-26
 * Time: 17:03
 */
class MyThread extends Thread{
    @Override
    public void run() {
        while (true) {
            System.out.println("Hello MyThread");
        }
    }
}

public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new MyThread();
        thread.start();
        while (true){
            System.out.println("Hello Main");
        }
    }
}
